
//  Copyright (C) 2009-2011 Luca Piccioni
// 
//  This program is free software: you can redistribute it and/or modify
//  it under the terms of the GNU General Public License as published by
//  the Free Software Foundation, either version 3 of the License, or
//  (at your option) any later version.
// 
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
// 
//  You should have received a copy of the GNU General Public License
//  along with this program.  If not, see <http://www.gnu.org/licenses/>.

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;

using Derm.Render;

namespace Derm.Raster
{
	/// <summary>
	/// ImageCodec for EXR file format.
	/// </summary>
	internal class ImageLoaderRAD : ImageCodecPlugin
	{
		#region ImageCodecPlugin Implementation

		/// <summary>
		/// Plugin name.
		/// </summary>
		public override string Name { get { return ("DermRAD"); } }

		/// <summary>
		/// Determine whether this plugin is available for the current process.
		/// </summary>
		/// <returns>
		/// It returns a boolean value indicating whether the plugin is available for the current
		/// process.
		/// </returns>
		public override bool CheckAvailability()
		{
			return (false);
		}

		/// <summary>
		/// Get a list of image formats supported for reading.
		/// </summary>
		public override IEnumerable<ImageFormat> SupportedReadImageFormats
		{
			get {
				return (sSupportedReadFormats);
			}
		}

		/// <summary>
		/// Get a list of image formats supported for writing.
		/// </summary>
		public override IEnumerable<ImageFormat> SupportedWriteImageFormats
		{
			get {
				return (null);
			}
		}

		/// <summary>
		/// Currently supported image formats for reading.
		/// </summary>
		private static ImageFormat[] sSupportedReadFormats = new ImageFormat[] {
			ImageFormat.Rad
		};

		/// <summary>
		/// Query image file informations.
		/// </summary>
		/// <returns>
		/// A <see cref="ImageCodec.ImageInfo"/>
		/// </returns>
		public override ImageInfo QueryImageInfo(Stream fs, ImageCodec.CodecCriteria criteria)
		{
			ImageInfo mInfo = new ImageInfo();

			return (mInfo);
		}

		/// <summary>
		/// Load image pixels from file.
		/// </summary>
		/// <returns>
		/// A <see cref="Image"/>
		/// </returns>
		/// <param name="criteria">
		/// A <see cref="ImageCodec.CodecCriteria"/> specifying parameters for loading an image stream.
		/// </param>
		public override Image Load(Stream fs, ImageCodec.CodecCriteria criteria)
		{
			Image image = null;

			return (image);
		}

		/// <summary>
		/// Save image pixels to file.
		/// </summary>
		/// <param name="fs">
		/// A <see cref="System.IO.FileStream"/> which stores the image data.
		/// </param>
		/// <param name="image">
		/// A <see cref="Image"/> holding the data to be stored.
		/// </param>
		/// <param name="criteria">
		/// A <see cref="ImageCodec.CodecCriteria"/> specifying parameters for loading an image stream.
		/// </param>
		public override void Save(Stream fs, Image image, ImageFormat format, ImageCodec.CodecCriteria criteria)
		{

		}

		#endregion
	}
}
